home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / l_rmnd16.arc / REMIND#2.BAT < prev   
DOS Batch File  |  1989-02-01  |  7KB  |  120 lines

  1. echo off
  2. rem ╔════════════════════════════════════════════════════════════════════════╗
  3. rem ║ First, we use LCG/Remind to ask whether or not to load                 ║
  4. rem ║ our print spooler.  Using /i:0 ensures that it will trigger every      ║
  5. rem ║ time the system is reboot.  The /l:3 gives us 3 seconds to answer the  ║
  6. rem ║ question.  If no answer is given, the default is to go ahead and load  ║
  7. rem ║ the spooler.                                                           ║
  8. rem ║                                                                        ║
  9. rem ║ The file spooler.msg looks like this:                                  ║
  10. rem ║                                                                        ║
  11. rem ║      Would you like to load the 64K                                    ║
  12. rem ║      print spooler?  %C                                                ║
  13. rem ╚════════════════════════════════════════════════════════════════════════╝
  14. lcg-rmnd /i:0 /m:spooler.msg /l:3
  15. if errorlevel 3 goto :NOSPOOL
  16. superspl lpt1:/m=64
  17. :NOSPOOL
  18. rem 
  19. rem ╔═══════════════════════════════════════════════════════════════════╗
  20. rem ║ This runs our disk optimizer, VOPT.EXE no more than once per day  ║
  21. rem ║ (/i:1), and only if it is before 10:00 AM (/tb:1000).             ║
  22. rem ║          LCG/Remind will track using the date file vopt.dat.  No  ║
  23. rem ║ message will be displayed (/m:).  If the program triggers the     ║
  24. rem ║ errorlevel will be set to 1, otherwise it will be set to 0.       ║
  25. rem ╚═══════════════════════════════════════════════════════════════════╝
  26. lcg-rmnd /i:1 /d:vopt.dat /m: /tb:1000
  27. if not errorlevel 1 goto :CHECK2
  28. echo Beginning the Vopt program...
  29. vopt c:
  30. vopt d:
  31. lcg-rmnd /reset /d:vopt.dat 
  32. :CHECK2
  33. rem 
  34. rem 
  35. rem ╔════════════════════════════════════════════════════════════════════╗
  36. rem ║                                                                    ║
  37. rem ║ In general, we do a complete back-up once a month, or whenever     ║
  38. rem ║ we accumulated more than 5 MB of new files.  We do incremental     ║
  39. rem ║ back-ups every 5 days.  The next command line will trigger on      ║
  40. rem ║ the first of each month (/e:01), or, if we are out of the          ║
  41. rem ║ office on the first, will trigger at least every 33 days, or       ║
  42. rem ║ whenever there is more than 5 MB of data on the c: drive in        ║
  43. rem ║ files with their archive bit set (/kt:5000 /pa:a:c:\*.*), but      ║
  44. rem ║ NOT if there has been a backup in the past 4 days (/n:4).  When    ║
  45. rem ║ triggered, it will display the following multiple choice           ║
  46. rem ║ message (/m:month.msg):                                            ║
  47. rem ║                                                                    ║
  48. rem ║           You last made a complete disk backup                     ║
  49. rem ║           on %d, and there are %f files that have                  ║
  50. rem ║           changed since then (%k KB of data).                      ║
  51. rem ║                                                                    ║
  52. rem ║              1 -- Quit                                             ║
  53. rem ║              2 -- Make an incremental backup (new files only)      ║
  54. rem ║              3 -- Make a complete disk backup                      ║
  55. rem ║                                                                    ║
  56. rem ║              Your Choice -- %c                                     ║
  57. rem ║                                                                    ║
  58. rem ║ LCG/Remind will return an errorlevel of 0 if not triggered, or,    ║
  59. rem ║ if triggered will set it according to the answer to the            ║
  60. rem ║ question displayed.  Because this is a complicated question we     ║
  61. rem ║ will allow 180 seconds for an answer (/l:180).                     ║
  62. rem ║                                                                    ║
  63. rem ╚════════════════════════════════════════════════════════════════════╝
  64. lcg-rmnd /i:33 /e:01 /n:4 /kt:5000 /pa:a:c\*.* /d:bu-all.dat /m:month.msg /l:180
  65. if errorlevel 3 goto :COMPLETE
  66. if errorlevel 2 goto :NEWONLY
  67. goto :CHECK3
  68. :COMPLETE
  69. echo Beginning complete backup...
  70. pcbackup c: /b
  71. lcg-rmnd /reset /d:bu-all.dat 
  72. goto :DONE
  73. :CHECK3
  74. rem 
  75. rem 
  76. rem ╔════════════════════════════════════════════════════════════════════╗
  77. rem ║ The next series will "force" a backup if it has been more than 10  ║
  78. rem ║ days, suggest one every Monday, if it has been more than 5 days,   ║
  79. rem ║ show a friendly message if the backup has been within the past     ║
  80. rem ║ 5 days.  It determines this by examining the data files bu-all.dat ║
  81. rem ║ (created everytime a complete backup is made), and bu-new.dat      ║
  82. rem ║ (created everytime the new files are backed up).                   ║
  83. rem ║ which the back-up program automatically creates.                   ║
  84. rem ║                                                                    ║
  85. rem ║ The file force.msg contains this message:                          ║
  86. rem ║                                                                    ║
  87. rem ║           The last disk backup was %n days                         ║
  88. rem ║           ago (on %d).                                             ║
  89. rem ║                                                                    ║
  90. rem ║           A new backup is overdue.                                 ║
  91. rem ║                                                                    ║
  92. rem ║ The file ask.msg contains this message:                            ║
  93. rem ║                                                                    ║
  94. rem ║           Your hard disks have not been backed                     ║
  95. rem ║                                                                    ║
  96. rem ║           Would you like to run your backup                        ║
  97. rem ║           program now? %c                                          ║
  98. rem ║                                                                    ║
  99. rem ║ The file friendly.msg looks like this:                             ║
  100. rem ║                                                                    ║
  101. rem ║           Your hard disk was last backed up                        ║
  102. rem ║           on %d.                                                   ║
  103. rem ╚════════════════════════════════════════════════════════════════════╝
  104. lcg-rmnd /i:10 /d:bu*.dat /m:force.msg /s
  105. if errorlevel 1 goto :NEWONLY                
  106. lcg-rmnd /w:1 /n:5 /d:bu*.dat /m:ask.msg
  107. if errorlevel 3 goto :DONE
  108. if errorlevel 2 goto :NEWONLY
  109. if errorlevel 1 goto :DONE
  110. goto :CHECK4
  111. :NEWONLY
  112. echo Beginning incremental backup (new files only)...
  113. pcbackup c: /m /b
  114. lcg-rmnd /reset /d:bu-new.dat
  115. goto :DONE
  116. :CHECK4
  117. lcg-rmnd /i:0 /d:bu*.dat /m:friendly.msg /l:5 
  118. :DONE
  119. echo Done with remind#2.bat
  120.